<template>
	<div>
		<div class="container center banner">
			<img src="../../static/img/banner.png" alt="" class="img-responsive pc-bg">
			<img src="../../static/img/m-banner.png" alt="" class="img-responsive m-bg">
		</div>
		<div class="container center item-nav">
			<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 ">
				<div class="pc-item-nav">
					<div class="pc-item-nav-tit">
						<label>学院概况</label>
						<span>/</span>
						<span>college overview</span>
					</div>
					<ul class="list-unstyled pc-item-nav-content">
						<li><i class="iconfont icon-arrows-8-2"></i><router-link to="/sco_info"><span>学院简介</span></router-link></li>
						<li><i class="iconfont icon-arrows-8-2"></i><router-link to="/sco_dyn"><span>学院动态</span></router-link></li>
						<li class="active"><i class="iconfont icon-arrows-8-2"></i><router-link to="/co_construction"><span>集体建设</span></router-link></li>
						<li><i class="iconfont icon-arrows-8-2"></i><router-link to="/teacher"><span>师资力量</span></router-link></li>
						<li><i class="iconfont icon-arrows-8-2"></i><router-link to="/campus_tour"><span>校园风光</span></router-link></li>
					</ul>
					<div>
						<router-link to="special_major_accouting">
							<img src="../../static/img/pro_info.png" class="img-responsive" alt="专业介绍">
						</router-link>
					</div>
					<div>
						<router-link to="sign_online">
							<img src="../../static/img/sign.png" class="img-responsive" alt="在线报名">
						</router-link>
					</div>
					
				</div>
				<!-- mobail -->
				<div class="m-item-nav m-5">
					<div>
						<router-link to='/sco_info'><span class="text-center">学院简介</span></router-link>
					</div>
					<div>
						<router-link to='/sco_dyn'><span class="text-center">学院动态</span></router-link>
					</div>
					<div class="active">
						<router-link to="/co_construction"><span class="text-center">集体建设</span></router-link>
					</div>
					<div>
						<router-link to="/teacher"><span class="text-center">师资力量</span></router-link>
					</div>
					<div>
						<router-link to="/campus_tour"><span class="text-center">校园风光</span></router-link>
					</div>
				</div>
			</div>
			<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 content">
				<div class="content-title">
					<div class="content-left">
						<span class="h3">集体建设</span>
					</div>
					<div class="content-right">
						<i class="iconfont icon-bofang"></i>
						<span><router-link to='/'>首页</router-link></span>
						<span>></span>
						<span><router-link to='/'>学院概况</router-link></span>
						<span>></span>
						<span><router-link to='/co_construction'>集体建设</router-link></span>
						<span>></span>
						<span><a href="javascript:void(0)">正文</a></span>
					</div>
				</div>
				<div class="dyn-list">
					<span id="none">资料正在整理中..</span>
					<div class="news">
						<h3>{{news.title}}</h3>
						<div class="news-info">
							<span>时间：{{news.add_time}}</span> <span>来源：{{news.origin}}</span>
						</div>
						<div v-html="news.content" id="news" class="news"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data(){
			return{
				news:'',
				newsId:''
			}
		},
		activated:function(){
			var _self = this;
	    	this.newsId = this.$route.params.id;
	　　　	var url="http://hh.c1903.com/index/api/artdetail";            
		  	this.$http.post(url,{token:'xueyuanyi',code:'1a11c6a0e49a916429c1719fa8d587e2',type:'8',id:this.newsId}
				).then(function (data) {
	    		var json = data.data;             
		  		_self.news = json;
		  		console.log(_self);
		  		
				document.title=_self.news.title;
				_self.$nextTick(() => {
					var info = document.getElementById("news");
					var p = info.getElementsByTagName("p");
					for (var i = 0; i < p.length; i++) {
						var img = p[i].getElementsByTagName("img");
						for (var j = 0; j <img.length; j++) {
							img[0].setAttribute("class", "img-responsive"); 
						}
			        }
				});
		  	});
		  
		},
	    watch: {
	        '$route': function () {
	            this.newsId = this.$route.params.id;
	        }
	    }
	}    
</script>

<style>
</style>